package pv

import (
	"kms-backend/controllers/pv"

	"github.com/gin-gonic/gin"
)

// 新增
func create(pvGroup *gin.RouterGroup) {
	pvGroup.POST("/create", pv.Create)
}

// 更新
func update(pvGroup *gin.RouterGroup) {
	pvGroup.POST("/update", pv.Update)
}

func detail(pvGroup *gin.RouterGroup) {
	pvGroup.GET("/detail", pv.Detail)
}

func list(pvGroup *gin.RouterGroup) {
	pvGroup.GET("/list", pv.List)
}

func delete(pvGroup *gin.RouterGroup) {
	pvGroup.POST("/delete", pv.Delete)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	// 配置路由策略
	pvGroup := g.Group("/pv")
	create(pvGroup)
	update(pvGroup)
	detail(pvGroup)
	list(pvGroup)
	delete(pvGroup)

}
